home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1998 September / Macworld (1998-09).dmg / Shareware World / Graphics / QPict 3.0 / QPict 3.0.rsrc / TEXT_128_Help Menu Guide.txt < prev    next >
Text File  |  1998-07-09  |  2KB  |  65 lines

  1. // ---------------------------------------------------------------------------
  2. //        ‚Ä¢ DoHelpMenuCommand
  3. // ---------------------------------------------------------------------------
  4. //    Launches specified URL and checks for errors.
  5. //
  6.  
  7. void
  8. CQPictApp::DoHelpMenuCommand(CommandT inCommand)
  9. {
  10.     if(inCommand == cmd_AboutHelpMenu)
  11.     {
  12.         LDialogBox* theDialog = (LDialogBox *) LWindow::CreateWindow(WIND_AboutHelp, this);
  13.     
  14.         //LCaption*     regName     = (LCaption*)theDialog->FindPaneByID(2011);
  15.         //LCaption*     regCompany    = (LCaption*)theDialog->FindPaneByID(2016);
  16.         
  17.         theDialog->Show();
  18.     }
  19.     else
  20.     {
  21.         //LStr255 url(STRx_HelpLocalURLStrings, inCommand);
  22.         LStr255 url(STRx_HelpExtURLStrings, inCommand);
  23.         
  24.         if(url != "\p")
  25.         {
  26.             ICError err = mIC->DoURL(url);
  27.             if(err != noErr)
  28.                 gError.ModalAlert(err, stop, 26);
  29.         }    
  30.     }
  31.     
  32. //    Str255 url;    
  33. //    ::GetIndString(url, STRx_HelpMenuURLStrings, strIndex);
  34.     //STRx_HelpExtURLStrings
  35. //    ICError err = mIC->DoURL(url);    
  36. //    if(err != noErr)
  37. //        gError.ModalAlert(err, stop, 26);
  38. }
  39.  
  40. // ---------------------------------------------------------------------------
  41. //        ‚Ä¢ SendSelfAEOpenDoc - static
  42. // ---------------------------------------------------------------------------
  43. //    Self-send an AppleEvent to open a document.
  44. //
  45.  
  46. void
  47. CQPictApp::SendSelfAEOpenDoc(FSSpec    &inFileSpec)
  48. {
  49.     Try_ 
  50.     {
  51.         AppleEvent    openEvent;
  52.         UAppleEventsMgr::MakeAppleEvent(kCoreEventClass, kAEOpen, openEvent);
  53.         
  54.         OSErr err = ::AEPutParamPtr(&openEvent, keyDirectObject, typeFSS,
  55.                                     &inFileSpec, sizeof(FSSpec));
  56.         ThrowIfOSErr_(err);
  57.         
  58.         UAppleEventsMgr::SendAppleEvent(openEvent);
  59.     }
  60.     Catch_(inErr)
  61.     {
  62.         // Ignore it.
  63.     } EndCatch_
  64. }
  65.